package LeaveRequest_Handler_20.Handler;

import LeaveRequest_Handler_20.LeaveHandler;
import LeaveRequest_Handler_20.LeaveRequest;

public class DirectorHandler extends LeaveHandler {

    @Override
    public void handleRequest(LeaveRequest request) {
        if (request.getDays() <= 30) {
            System.out.println("总监同意" + request.getName() + "的请假申请，请假天数为" + request.getDays() + "天");
        } else if (nextHandler != null) {
            nextHandler.handleRequest(request);
        } else {
            System.out.println("没有人可以处理");
        }
    }
}
